package com.jsb.laundry.model.shops;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import wiremock.com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
//@JsonIgnoreProperties({"uid", "dataStartTime", "dataEndTime", "increaseStartTime", "increaseEndTime"})
public class ShopHomeVo implements Serializable {

    private static final long serialVersionUID = 701600696615489655L;

//    @JsonIgnore
    private String uid;
    /**
     * 经营数据 时间筛选条件
     */
    @JsonIgnore
    private Date dataStartTime;
    @JsonIgnore
    private Date dataEndTime;
    /**
     * 增长趋势 时间筛选条件
     */
    @JsonIgnore
    private Date increaseStartTime;
    @JsonIgnore
    private Date increaseEndTime;

    /**
     * 店铺信息
     */
    private ShopInfo shopInfo;
    /**
     * 代办事项
     */
    private AgentMatters agentMatters;
    /**
     * 经营数据
     */
    private ManageData manageData;
    /**
     * 增长趋势
     */
    private List<IncreaseTrend> increaseTrend;
    /**
     * 增长趋势
     * 赚取佣金 0 拉新人数 1 入库包裹数量 2 出库包裹数量 3
     */
    private String increaseTrendIndex;


    /**
     * 店铺信息
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class ShopInfo {
        /**
         * 店铺ID
         */
        @ApiModelProperty(value = "店铺ID")
        private String shopsId;

        /**
         * 店铺名称
         */
        @ApiModelProperty(value = "店铺名称")
        private String shopsName;

        /**
         * 店铺logo
         */
        @ApiModelProperty(value = "店铺logo")
        private String shopsLogo;

        /**
         * 站点类别(0:普通店铺，1：旗舰店,2:工厂 )
         */
        @ApiModelProperty(value = "站点类别(0:普通店铺，1：旗舰店,2:工厂 )")
        private String shopsType;

        @ApiModelProperty(value = "店铺地址")
        private String shopsAddress;
        @ApiModelProperty(value = "推荐码")
        private String shopReferenceCode;
        @ApiModelProperty(value = "综合体验评分")
        private String shopsMark;
        @ApiModelProperty(value = "综合体验评分%率")
        private String shopsMarkRate;
        @ApiModelProperty(value = "今日日订单量")
        private Integer currentDayOrderNum;
        @ApiModelProperty(value = "昨日订单量")
        private Integer yesterdayOrderNum;
        /**
         * (今日-昨日)/昨日
         */
        @ApiModelProperty(value = "较前一天%率")
        private String orderNumRate;
    }

    /**
     * 代办事项
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class AgentMatters {
        @ApiModelProperty(value = "未入库包裹")
        private String noInShopOrderNum;
        @ApiModelProperty(value = "24小时新增未入库包裹")
        private String noInShopOrderNum24;
        @ApiModelProperty(value = "已超时包裹")
        private String timeOutOrderNum;
        @ApiModelProperty(value = "24小时新增的超时包裹")
        private String timeOutOrderNum24;
        @ApiModelProperty(value = "待取件包裹")
        private String waitPickUpNum;
        @ApiModelProperty(value = "24小时新增待取件包裹")
        private String waitPickUpNum24;
    }

    /**
     * 经营数据
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class ManageData {
        @ApiModelProperty(value = "今天佣金")
        private String money;
        @ApiModelProperty(value = "昨天佣金")
        private String preMoney;
        @ApiModelProperty(value = "佣金增长率")
        private String moneyRate;

        @ApiModelProperty(value = "已结算")
        private String alreadyRebateTotal;
        @ApiModelProperty(value = "待结算")
        private String waitRebateTotal;

        @ApiModelProperty(value = "拉新人数")
        private String newNumber;
        private String newNumberTotal;
        @ApiModelProperty(value = "拉新人数%率")
        private String newNumberRate;


        @ApiModelProperty(value = "入库包裹量")
        private String inShopOrderNum;
        private String preInShopOrderNum;
        @ApiModelProperty(value = "入库包裹量%率")
        private String inShopOrderNumRate;
        @ApiModelProperty(value = "出库包裹量")
        private String outShopOrderNum;
        private String preOutShopOrderNum;
        @ApiModelProperty(value = "出库包裹量%率")
        private String outShopOrderNumRate;
    }

    /**
     * 增长趋势
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    public static class IncreaseTrend {
        @ApiModelProperty(value = "佣金总金额|拉新人数|入库包裹数量|出库包裹数量")
        private int num1;
        @ApiModelProperty(value = "已结算金额")
        private int num2;
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date createTime;
        private Long timeStamp;
    }
}
